package com.hdl.design.pattern.engine.strategy.req;

import java.util.Map;

/**
 * 类名 ReqDataContext
 * 描述 TODO
 *
 * @author hedonglin
 * @version 1.0
 * @date 2019/9/25 14:57
 */
public class ReqDataContext {
    /**
     * 聚合请求数据策略
     */
    private ReqDataStrategy reqDataStrategy;

    public ReqDataContext(ReqDataStrategy reqDataStrategy) {
        this.reqDataStrategy = reqDataStrategy;
    }

    /**
     * 方法描述: 请求数据上下文接口
     * @param msg 请求数据
     * @author hedonglin
     * @date 2019/9/25 15:01
     * @return {@link Map} map
    */
    public Map<String, Object> context(String msg){
        return reqDataStrategy.reqDataToMap(msg);
    }

}
